package com.thoughtworks;

public class ReturnBookAction implements Action {

public void doAction(ActionParams actionParams)
{
    actionParams.output.displayMessage("Enter the name of the book");
    String message;
    String name=actionParams.input.getString();
    boolean result=actionParams.library.returnBook(actionParams.libraryNumber,name);
        if(result)
            message="Thank you for returning the book";
        else
            message="That is not a valid book to return.";

        actionParams.output.displayMessage(message);

}
}
